<?php
$http = new \Swoole\Http\Server('0.0.0.0',6060);
//配置
$http->set([
    'daemonize'=>1,//守护进程
    'worker_num'=>1,
    //静态资源配置选项
    //虚拟目录指向的位置，只针对静态文件 html js img video
    'document_root'=>'/wwwdata/web',
    'enable_static_handler'=>'true',
]);
$http->on("request",function ($request,$response){
    $response->status(404);
    $response->header("Content-Type", "text/html; charset=utf-8");
    $response->end("<h1 style='margin: auto'>王梓妤真好看！！！</h1><br><img src='https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1406166804,3744562059&fm=15&gp=0.jpg'>");
//        $response->end("<h1 style='margin: auto'>冯媛：你哥说你像下边的小可爱！！！</h1><br><img src='https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3090162626,3597556694&fm=26&gp=0.jpg'>");

});

$http->start();